/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

/**
 * <p>Project: javase - Img3
 * <p>Powered by webrx On 2021-12-09 15:07:50
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Img3 {
    public static void main(String[] args) throws IOException {
        var i = ImageIO.read(new File("g.jpg"));
        var ii = new BufferedImage(i.getWidth(), i.getHeight(), 10);
        var g = ii.createGraphics();
        g.drawImage(i, 0, 0, null);
        ImageIO.write(ii, "jpg", new File("g2.jpg"));
    }
}
